package com.itheima.dao;

import com.itheima.domain.Order;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface OrderDao {
    /**
     * 根据预约信息时间，用户会员ID，套餐ID查询预约是否重复
     * @param order
     * @return
     */
    List<Order> findByCondition(Order order);

    /**
     * 添加预约信息
     * @param order
     */
    void add(Order order);

    /**
     * 根据预约信息ID查询预约信息
     * @param id
     * @return
     */
    Map findById4Detail(Integer id);

    Integer findOrderCountByDate(String today);

    Integer findOrderCountAfterDate(@Param("thisWeekMonday") String thisWeekMonday, @Param("thisWeekSunday")String thisWeekSunday);

    Integer findVisitsCountByDate(String today);

    Integer findVisitsCountAfterDate(@Param("first") String thisWeekMonday,@Param("list") String thisWeekSunday);

    List<Map> findHotSetmeal();
}
